package transactionimplementation

import (
	"salary/abstracttransactions"
	"salary/database"
	"salary/model"
	"salary/modelimplementation"
)

type ChangeMemberTransaction struct {
	abstracttransactions.ChangeAffiliationTransaction
	dues     	float64
	memberId 	int
}

func (cmt *ChangeMemberTransaction) RecordMembership(employee *model.Employee) {
	database.Database.AddUnionMember(cmt.memberId, employee)
}
func (cmt *ChangeMemberTransaction) GetAffiliation() model.Affiliation {
	return modelimplementation.NewUnionAffiliation(cmt.memberId, cmt.dues)
}
